#ifndef TRAN_ITEM_H
#define TRAN_ITEM_H

#include <QtGui>
#include "shareheader.h"

class TranItem: public QWidget
{
	Q_OBJECT

	public:
        TranItem(int type, QWidget *parent = 0);
		~TranItem();

    private:
        int m_type;
		TTranSetting m_tranSetting;
		void SetupUI();
		void Initialize(int type, bool isOn, int ratio);

		QHBoxLayout *horizontalLayout;
		QCheckBox *checkBox;
		QLabel *label; // name label
		QLineEdit *lineEdit;
		QLabel *label_2; // % label

	signals:
		void checkChanged(int type, bool isOn); 
		void ratioChanged(int type, int ratio);

	public slots:
        void CheckHandle(int state);
        void RatioHandle();
};

#endif

